clc;clear;tic;

global rho gma delta1 delta2 beta T ...
    psi_m psi_f alpha ...
    level_model level_data share_model share_data ...
    ind11 ind12 ind21 ind22 ...
    Cobb_Douglas price_reduction decomposition ...
    a_m a_f a_g a_y a_h ...
    W W_m W_f p P_c ...
    age married insample_data nkid X_theta phi_theta ...
    free_childcare no_response W0 min_Y_c outcome doutcome min_x max_x pbar_h N ...
    insample_baseline K edu_m i

% initialize options
initialize;

%% calibration (Tables D1 and D2)
calibration=true;simulate;

%% decomposition (Table 6)
calibration=false;decomposition=true;baseline=true;simulate;
baseline=false;equal_wage=true;simulate;
equal_price=true;simulate;
equal_wage=false;equal_price=false;equal_tech=true;simulate;
equal_tech=false;equal_pref=true;simulate;

%% 30% price reduction (Table 7)
% nested CES
decomposition=false;price_reduction=true;quo=true;simulate;
quo=false;pct_reduction=30;reduce_W=true;simulate;
reduce_W=false;reduce_W_constant_full_income=true;simulate;
reduce_W_constant_full_income=false;reduce_p=true;simulate;
reduce_p=false;reduce_P_c=true;simulate;

% Cobb-Douglas 
reduce_P_c=false;Cobb_Douglas=true;quo=true;simulate;
quo=false;pct_reduction=30;reduce_W=true;simulate;
reduce_W=false;reduce_W_constant_full_income=true;simulate;
reduce_W_constant_full_income=false;reduce_p=true;simulate;
reduce_p=false;reduce_P_c=true;simulate;

%% 10 % price reduction (Table D3)
% nested CES
reduce_P_c=false;Cobb_Douglas=false;quo=true;simulate;
quo=false;pct_reduction=10;reduce_W=true;simulate;
reduce_W=false;reduce_W_constant_full_income=true;simulate;
reduce_W_constant_full_income=false;reduce_p=true;simulate;
reduce_p=false;reduce_P_c=true;simulate;

% Cobb-Douglas 
reduce_P_c=false;Cobb_Douglas=true;quo=true;simulate;
quo=false;pct_reduction=10;reduce_W=true;simulate;
reduce_W=false;reduce_W_constant_full_income=true;simulate;
reduce_W_constant_full_income=false;reduce_p=true;simulate;
reduce_p=false;reduce_P_c=true;simulate;

%% 50 % price reduction Table D3)
% nested CES
reduce_P_c=false;Cobb_Douglas=false;quo=true;simulate;
quo=false;pct_reduction=50;reduce_W=true;simulate;
reduce_W=false;reduce_W_constant_full_income=true;simulate;
reduce_W_constant_full_income=false;reduce_p=true;simulate;
reduce_p=false;reduce_P_c=true;simulate;

% Cobb-Douglas 
reduce_P_c=false;Cobb_Douglas=true;quo=true;simulate;
quo=false;pct_reduction=50;reduce_W=true;simulate;
reduce_W=false;reduce_W_constant_full_income=true;simulate;
reduce_W_constant_full_income=false;reduce_p=true;simulate;
reduce_p=false;reduce_P_c=true;simulate;

%% free childcare (Table D7)

% nested CES
price_reduction=false;Cobb_Douglas=false;free_childcare=true;simulate;

% Cobb-Douglas
Cobb_Douglas=true;simulate;

%% free childcare with no response in inputs

% Cobb-Douglas
no_response=true;simulate;

% nested CES
Cobb_Douglas=false;simulate;

%% generate tables
gentab;

toc;
